<template>
  <view>
    <view class="xmain">
      <headBar title="模拟考试"></headBar>
      <view class="examineNoticeContent">
        <view class="examineBox">
          <view class="examineBoxTitle">{{appTitle}}</view>
          <view class="examineBoxLine">
            <view class=" uni-flex uni-row">
              <view class=" uni-flex uni-column examineBoxLineRight">考试车型：</view>
              <view class=" uni-flex uni-column examineBoxLineLeft">{{examinName}}</view>
            </view>
          </view>
          <view class="examineBoxLine">
            <view class=" uni-flex uni-row">
              <view class=" uni-flex uni-column examineBoxLineRight">考试标准：</view>
              <view class=" uni-flex uni-column examineBoxLineLeft">45分钟，100题</view>
            </view>
          </view>
          <view class="examineBoxLine">
            <view class=" uni-flex uni-row">
              <view class=" uni-flex uni-column examineBoxLineRight">合格标准：</view>
              <view class=" uni-flex uni-column examineBoxLineLeft">90分（满分100分）</view>
            </view>
          </view>
          <view class="examineBoxLine">
            <view class=" uni-flex uni-row">
              <view class=" uni-flex uni-column examineBoxLineRight">出题规则：</view>
              <view class=" uni-flex uni-column examineBoxLineLeft">公安部规定出题组卷</view>
            </view>
          </view>
          <view class="examineBoxLine" style="font-size: 25rpx; text-align: center;color:#3495fc">
            计分规则：模拟考试不能修改答案，每错1题扣1分
          </view>
        </view>
        <view style="text-align: center;">
          <button style="width:80%;margin: 40rpx 10%;" type="primary" @click="start()">开始考试</button>
        </view>
      </view>
      <bootNav nav="home"></bootNav>
    </view>
  </view>

</template>

<script>
export default {
  data() {
    return {
      model: "c1",
      subject: 1,
      cheTypeList:{
        xiaoche:{alias:"小车",remark:"C1/C2/C3",model:"c1"},
        huoche:{alias:"货车",remark:"A2/B2",model:"a2"},
        keche:{alias:"客车",remark:"A1/A3/B1",model:"a1"},
        motoche:{alias:"摩托车",remark:"D/E/F",model:"d"},
      },
      examinName:''
    }
  },
  onShareAppMessage() {
    return {
      title: this.title,
    }
  },
  onShareTimeline: function () {
    return {
      title: this.title,
    }
  },
  onLoad(e) {
    var t = this;
    var storgeCarType = t.xCacheGet('carType');
    if(storgeCarType){
      var currentCar = t.cheTypeList[storgeCarType];
      t.examinName = currentCar['alias']+'【'+currentCar['remark']+'】';
      t.model = currentCar['model'];
    }
    if (e.subject) {
      t.subject = e.subject;
    }

  },
  methods: {
    start(){
      var t = this;
      t.x_redirect("/pages/examin/question?model="+t.model+"&subject="+t.subject)
    }
  }
}
</script>

<style>
@import "./examin.css";

</style>
